package io.plus.common.packet.auth;

import io.plus.common.packet.metadata.Command;
import io.plus.common.packet.metadata.RequestMessage;
import lombok.Data;

@Data
public class LoginRequestMessage extends RequestMessage {

    private static final long serialVersionUID = -10113316720288444L;

    private String loginname;

    private String password;

    private String token;

    public LoginRequestMessage() {
    }

    public LoginRequestMessage(String token) {
        this.token = token;
        this.cmd = Command.login_request.getNumber();
    }

    public LoginRequestMessage(String loginname, String password) {
        this.loginname = loginname;
        this.password = password;
        this.cmd = Command.login_request.getNumber();
    }

    public LoginRequestMessage(String loginname, String password, String token) {
        this(loginname, password);
        this.token = token;
    }
}
